/*
 * XML Type:  XPara
 * Namespace: http://www.seedwill.com/xul/core
 * Java type: com.seedwill.xul.core.XPara
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.core.impl;
/**
 * An XML XPara(@http://www.seedwill.com/xul/core).
 *
 * This is a complex type.
 */
public class XParaImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.seedwill.xul.core.XPara
{
    private static final long serialVersionUID = 1L;
    
    public XParaImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName NAME$0 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName TYPE$2 = 
        new javax.xml.namespace.QName("", "type");
    private static final javax.xml.namespace.QName INOUT$4 = 
        new javax.xml.namespace.QName("", "inout");
    private static final javax.xml.namespace.QName MAND$6 = 
        new javax.xml.namespace.QName("", "mand");
    private static final javax.xml.namespace.QName READONLY$8 = 
        new javax.xml.namespace.QName("", "readonly");
    private static final javax.xml.namespace.QName DEFAULT$10 = 
        new javax.xml.namespace.QName("", "default");
    private static final javax.xml.namespace.QName FORMAT$12 = 
        new javax.xml.namespace.QName("", "format");
    private static final javax.xml.namespace.QName VALIDATORS$14 = 
        new javax.xml.namespace.QName("", "validators");
    private static final javax.xml.namespace.QName FIELDS$16 = 
        new javax.xml.namespace.QName("", "fields");
    private static final javax.xml.namespace.QName ATTRIBUTES$18 = 
        new javax.xml.namespace.QName("", "attributes");
    private static final javax.xml.namespace.QName PREFERROOT$20 = 
        new javax.xml.namespace.QName("", "preferRoot");
    
    
    /**
     * Gets the "name" element
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" element
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "name" element
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" element
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(NAME$0);
            }
            target.set(name);
        }
    }
    
    /**
     * Gets the "type" element
     */
    public java.lang.String getType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TYPE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "type" element
     */
    public org.apache.xmlbeans.XmlString xgetType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TYPE$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "type" element
     */
    public void setType(java.lang.String type)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TYPE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TYPE$2);
            }
            target.setStringValue(type);
        }
    }
    
    /**
     * Sets (as xml) the "type" element
     */
    public void xsetType(org.apache.xmlbeans.XmlString type)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TYPE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TYPE$2);
            }
            target.set(type);
        }
    }
    
    /**
     * Gets the "inout" element
     */
    public com.seedwill.xul.core.XParaInOut.Enum getInout()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INOUT$4, 0);
            if (target == null)
            {
                return null;
            }
            return (com.seedwill.xul.core.XParaInOut.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "inout" element
     */
    public com.seedwill.xul.core.XParaInOut xgetInout()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XParaInOut target = null;
            target = (com.seedwill.xul.core.XParaInOut)get_store().find_element_user(INOUT$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "inout" element
     */
    public void setInout(com.seedwill.xul.core.XParaInOut.Enum inout)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INOUT$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INOUT$4);
            }
            target.setEnumValue(inout);
        }
    }
    
    /**
     * Sets (as xml) the "inout" element
     */
    public void xsetInout(com.seedwill.xul.core.XParaInOut inout)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XParaInOut target = null;
            target = (com.seedwill.xul.core.XParaInOut)get_store().find_element_user(INOUT$4, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.core.XParaInOut)get_store().add_element_user(INOUT$4);
            }
            target.set(inout);
        }
    }
    
    /**
     * Gets the "mand" element
     */
    public boolean getMand()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAND$6, 0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "mand" element
     */
    public org.apache.xmlbeans.XmlBoolean xgetMand()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(MAND$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "mand" element
     */
    public void setMand(boolean mand)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAND$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAND$6);
            }
            target.setBooleanValue(mand);
        }
    }
    
    /**
     * Sets (as xml) the "mand" element
     */
    public void xsetMand(org.apache.xmlbeans.XmlBoolean mand)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(MAND$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(MAND$6);
            }
            target.set(mand);
        }
    }
    
    /**
     * Gets the "readonly" element
     */
    public boolean getReadonly()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(READONLY$8, 0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "readonly" element
     */
    public org.apache.xmlbeans.XmlBoolean xgetReadonly()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(READONLY$8, 0);
            return target;
        }
    }
    
    /**
     * Sets the "readonly" element
     */
    public void setReadonly(boolean readonly)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(READONLY$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(READONLY$8);
            }
            target.setBooleanValue(readonly);
        }
    }
    
    /**
     * Sets (as xml) the "readonly" element
     */
    public void xsetReadonly(org.apache.xmlbeans.XmlBoolean readonly)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(READONLY$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(READONLY$8);
            }
            target.set(readonly);
        }
    }
    
    /**
     * Gets the "default" element
     */
    public org.apache.xmlbeans.XmlAnySimpleType getDefault()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnySimpleType target = null;
            target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_element_user(DEFAULT$10, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "default" element
     */
    public void setDefault(org.apache.xmlbeans.XmlAnySimpleType xdefault)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnySimpleType target = null;
            target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_element_user(DEFAULT$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_element_user(DEFAULT$10);
            }
            target.set(xdefault);
        }
    }
    
    /**
     * Appends and returns a new empty "default" element
     */
    public org.apache.xmlbeans.XmlAnySimpleType addNewDefault()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnySimpleType target = null;
            target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_element_user(DEFAULT$10);
            return target;
        }
    }
    
    /**
     * Gets the "format" element
     */
    public java.lang.String getFormat()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FORMAT$12, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "format" element
     */
    public org.apache.xmlbeans.XmlString xgetFormat()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FORMAT$12, 0);
            return target;
        }
    }
    
    /**
     * Sets the "format" element
     */
    public void setFormat(java.lang.String format)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FORMAT$12, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FORMAT$12);
            }
            target.setStringValue(format);
        }
    }
    
    /**
     * Sets (as xml) the "format" element
     */
    public void xsetFormat(org.apache.xmlbeans.XmlString format)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FORMAT$12, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FORMAT$12);
            }
            target.set(format);
        }
    }
    
    /**
     * Gets array of all "validators" elements
     */
    public com.seedwill.xul.core.XParaValidator[] getValidatorsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(VALIDATORS$14, targetList);
            com.seedwill.xul.core.XParaValidator[] result = new com.seedwill.xul.core.XParaValidator[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "validators" element
     */
    public com.seedwill.xul.core.XParaValidator getValidatorsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XParaValidator target = null;
            target = (com.seedwill.xul.core.XParaValidator)get_store().find_element_user(VALIDATORS$14, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "validators" element
     */
    public int sizeOfValidatorsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(VALIDATORS$14);
        }
    }
    
    /**
     * Sets array of all "validators" element
     */
    public void setValidatorsArray(com.seedwill.xul.core.XParaValidator[] validatorsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(validatorsArray, VALIDATORS$14);
        }
    }
    
    /**
     * Sets ith "validators" element
     */
    public void setValidatorsArray(int i, com.seedwill.xul.core.XParaValidator validators)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XParaValidator target = null;
            target = (com.seedwill.xul.core.XParaValidator)get_store().find_element_user(VALIDATORS$14, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(validators);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "validators" element
     */
    public com.seedwill.xul.core.XParaValidator insertNewValidators(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XParaValidator target = null;
            target = (com.seedwill.xul.core.XParaValidator)get_store().insert_element_user(VALIDATORS$14, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "validators" element
     */
    public com.seedwill.xul.core.XParaValidator addNewValidators()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XParaValidator target = null;
            target = (com.seedwill.xul.core.XParaValidator)get_store().add_element_user(VALIDATORS$14);
            return target;
        }
    }
    
    /**
     * Removes the ith "validators" element
     */
    public void removeValidators(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(VALIDATORS$14, i);
        }
    }
    
    /**
     * Gets the "fields" element
     */
    public com.seedwill.xul.core.XPara getFields()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XPara target = null;
            target = (com.seedwill.xul.core.XPara)get_store().find_element_user(FIELDS$16, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "fields" element
     */
    public void setFields(com.seedwill.xul.core.XPara fields)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XPara target = null;
            target = (com.seedwill.xul.core.XPara)get_store().find_element_user(FIELDS$16, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.core.XPara)get_store().add_element_user(FIELDS$16);
            }
            target.set(fields);
        }
    }
    
    /**
     * Appends and returns a new empty "fields" element
     */
    public com.seedwill.xul.core.XPara addNewFields()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XPara target = null;
            target = (com.seedwill.xul.core.XPara)get_store().add_element_user(FIELDS$16);
            return target;
        }
    }
    
    /**
     * Gets the "attributes" element
     */
    public com.seedwill.xul.core.XPara getAttributes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XPara target = null;
            target = (com.seedwill.xul.core.XPara)get_store().find_element_user(ATTRIBUTES$18, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "attributes" element
     */
    public void setAttributes(com.seedwill.xul.core.XPara attributes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XPara target = null;
            target = (com.seedwill.xul.core.XPara)get_store().find_element_user(ATTRIBUTES$18, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.core.XPara)get_store().add_element_user(ATTRIBUTES$18);
            }
            target.set(attributes);
        }
    }
    
    /**
     * Appends and returns a new empty "attributes" element
     */
    public com.seedwill.xul.core.XPara addNewAttributes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XPara target = null;
            target = (com.seedwill.xul.core.XPara)get_store().add_element_user(ATTRIBUTES$18);
            return target;
        }
    }
    
    /**
     * Gets the "preferRoot" element
     */
    public java.lang.String getPreferRoot()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PREFERROOT$20, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "preferRoot" element
     */
    public org.apache.xmlbeans.XmlString xgetPreferRoot()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PREFERROOT$20, 0);
            return target;
        }
    }
    
    /**
     * Sets the "preferRoot" element
     */
    public void setPreferRoot(java.lang.String preferRoot)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PREFERROOT$20, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PREFERROOT$20);
            }
            target.setStringValue(preferRoot);
        }
    }
    
    /**
     * Sets (as xml) the "preferRoot" element
     */
    public void xsetPreferRoot(org.apache.xmlbeans.XmlString preferRoot)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PREFERROOT$20, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PREFERROOT$20);
            }
            target.set(preferRoot);
        }
    }
}
